package com.hy.admin.dao;

import com.hy.admin.entity.QuestionLikeEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface QuestionLikeDao {
    int deleteByPrimaryKey(Long id);

    int insert(QuestionLikeEntity record);

    int insertSelective(QuestionLikeEntity record);

    QuestionLikeEntity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(QuestionLikeEntity record);

    int updateByPrimaryKey(QuestionLikeEntity record);

    /**
     * 查询用户是否已点赞（0-未点赞，1-已点赞）
     * @param questionId
     * @param memberId
     * @return
     */
    int selectCountByQIdAndMId(@Param("questionId") Long questionId, @Param("memberId") Long memberId);
}